﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>小苹果系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <script src="/jslib/jquery-3.4.1.min.js"></script>
    <style>
        .page {
            position: relative;
        }

        .welcomeText {
            color: #009688;
            font-size: 30px;
            text-align: center;
            position: absolute;
            top: 26%;
            left: 0;
            width: 100%;
        }
    </style>
</head>
<body>
    <div class="page">
        <div class="welcomeText">欢迎回来！</div>
        <img id="bgimg" src="/resource/welcome.jpg" style="width:100%;height:100%" onerror="/resource/welcome.jpg" />
    </div>
</body>
</html>

<script type="text/javascript">
    var GetUrlParam = function (name, url) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        if (url) {
            var r = url.substr(url.indexOf('?') + 1).match(reg);
            if (r != null)
                return unescape(r[2]);
        }
        else {
            var r = window.location.search.substr(1).match(reg); //匹配目标参数
            if (r != null)
                return unescape(r[2]);
        }
        return null; //返回参数值
    }

    $("#bgimg").attr("src", GetUrlParam("imgsrc"));
</script>